<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>01_复习</title>
        <style>
            /* div[class = "d1 d2"] {
                color: #aa381e;
            } */

            /* div[class ~= "d2"] {
                color: #aa381e;
            } */

            div[class |= "d4"] {
                color: #aa381e;
            }

        </style>
    </head>
    <body>
        <div class="d1 d2">哈哈哈</div>
        <div class="d3-d4">嘿嘿嘿</div>
    </body>
</html>